<!DOCTYPE html>
<html>
<head>
<title>Example</title>
</head>
<body>
<div id="app"></div>

<script>
  const avm = {
    h(tag, props, ...children) {
      const element = document.createElement(tag);
      
      if (props) {
        Object.keys(props).forEach(key => {
          element.setAttribute(key, props[key]);
        });
      }
      
      if (children) {
        children.forEach(child => {
          if (typeof child === 'string') {
            element.textContent = child;
          } else {
            element.appendChild(child);
          }
        });
      }
      
      return element;
    }
  };

  const app = document.getElementById('app');
  const element = avm.h('h1', { class: 'title' }, 'Hello, world-avm!');
  app.appendChild(element);
</script>
</body>
</html>